#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <string.h>
void ReverseChar(char* arr)
{

	char* left = arr;     
	char* right = arr + strlen(arr) - 1;     
	while (left < right)    
	{         
	char temp = *right;       
	*right = *left;        
	*left = temp;     
	left++;         
	right--;     
	}    
	int i = 0;    
	while (i < strlen(arr))    
	{         
	printf("%c", arr[i]);         
	i++;     
	}
}
int main()
{
	char arr[10000] = {0};
	while (gets(arr))
	{
		ReverseChar(arr);
	}
	return 0;
}

//#include<stdio.h>
//int main() {
//	char in[100];
//	gets(in);
//	for (int i = strlen(in) - 1; i >= 0; i--) {
//		printf("%c", in[i]);
//	}
//}